Optimal. Leaf size=84 \[ -\frac {i d x}{4 a f}+\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3804, 3560, 8}
\begin {gather*} \frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}+\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}-\frac {i d x}{4 a f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3560
Rule 3804
Rubi steps
\begin {align*} \int \frac {c+d x}{a+i a \tan (e+f x)} \, dx &=\frac {(c+d x)^2}{4 a d}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}-\frac {(i d) \int \frac {1}{a+i a \tan (e+f x)} \, dx}{2 f}\\ &=\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}-\frac {(i d) \int 1 \, dx}{4 a f}\\ &=-\frac {i d x}{4 a f}+\frac {(c+d x)^2}{4 a d}+\frac {d}{4 f^2 (a+i a \tan (e+f x))}+\frac {i (c+d x)}{2 f (a+i a \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.34, size = 96, normalized size = 1.14 \begin {gather*} \frac {-i \left (2 c f (i+2 f x)+d \left (1+2 i f x+2 f^2 x^2\right )\right )+\left (2 c f (-i+2 f x)+d \left (-1-2 i f x+2 f^2 x^2\right )\right ) \tan (e+f x)}{8 a f^2 (-i+\tan (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.50, size = 50, normalized size = 0.60
method | result | size |
risch | \(\frac {d \,x^{2}}{4 a}+\frac {c x}{2 a}+\frac {i \left (2 d x f +2 c f -i d \right ) {\mathrm e}^{-2 i \left (f x +e \right )}}{8 a \,f^{2}}\) | \(50\) |
norman | \(\frac {\frac {d \,x^{2}}{4 a}+\frac {2 i c f +d}{4 a \,f^{2}}+\frac {d \,x^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{4 a}+\frac {\left (2 c f -i d \right ) \tan \left (f x +e \right )}{4 a \,f^{2}}+\frac {\left (2 c f +i d \right ) x}{4 a f}+\frac {d x \tan \left (f x +e \right )}{2 a f}+\frac {\left (2 c f -i d \right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{4 f a}}{1+\tan ^{2}\left (f x +e \right )}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 57, normalized size = 0.68 \begin {gather*} \frac {{\left (2 i \, d f x + 2 i \, c f + 2 \, {\left (d f^{2} x^{2} + 2 \, c f^{2} x\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + d\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.12, size = 92, normalized size = 1.10 \begin {gather*} \begin {cases} \frac {\left (2 i c f + 2 i d f x + d\right ) e^{- 2 i e} e^{- 2 i f x}}{8 a f^{2}} & \text {for}\: a f^{2} e^{2 i e} \neq 0 \\\frac {c x e^{- 2 i e}}{2 a} + \frac {d x^{2} e^{- 2 i e}}{4 a} & \text {otherwise} \end {cases} + \frac {c x}{2 a} + \frac {d x^{2}}{4 a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 65, normalized size = 0.77 \begin {gather*} \frac {{\left (2 \, d f^{2} x^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, c f^{2} x e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, d f x + 2 i \, c f + d\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.81, size = 105, normalized size = 1.25 \begin {gather*} \frac {d\,\cos \left (2\,e+2\,f\,x\right )+2\,d\,f^2\,x^2+2\,c\,f\,\sin \left (2\,e+2\,f\,x\right )+4\,c\,f^2\,x+2\,d\,f\,x\,\sin \left (2\,e+2\,f\,x\right )-d\,\sin \left (2\,e+2\,f\,x\right )\,1{}\mathrm {i}+c\,f\,\cos \left (2\,e+2\,f\,x\right )\,2{}\mathrm {i}+d\,f\,x\,\cos \left (2\,e+2\,f\,x\right )\,2{}\mathrm {i}}{8\,a\,f^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________